<iframe th:replace="common/top.html" width="100%" frameborder="0" scrolling="yes" class="x-iframe"></iframe>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>用户信息</title>
    <base th:href="@{/}">
    <link rel="StyleSheet" href="css/profile.css" type="text/css" media="screen"/>
    <link rel="StyleSheet" href="css/common.css" type="text/css" media="screen"/>
</head>
<body>
    <!-- 返回按钮 -->
    <div style="position: absolute; top: 40px; left: 1500px;">
        <a th:href="@{/account/accountMain}" class="back-btn">返回</a>
    </div>
    <h1>用户信息</h1>
    <div style="text-align: center">
<form th:href="@{/account/profile/{userid}(userid=${accountToUpdate.userid})}" method="post">

    <h3>账户信息</h3>
    <table>
        <tr>
            <td>用户名：</td>
            <td><input type="text" name="username" th:value="${accountToUpdate.userid}"></td>
        </tr>
        <tr>
            <td>密码：</td>
            <td><input name="password" th:value="${accountSign.password}" type="password"></td>
        </tr>
    </table>
    <h3>个人资料</h3>
    <table>
        <tr>
            <td>姓：</td>
            <td><input type="text" name="firstname" th:value="${accountToUpdate.firstname}"></td>
        </tr>
        <tr>
            <td>名：</td>
            <td><input type="text" name="lastname" th:value="${accountToUpdate.lastname}"></td>
        </tr>
        <tr>
            <td>电子邮箱：</td>
            <td><input type="text" name="email" th:value="${accountToUpdate.email}"></td>
        </tr>
        <tr>
            <td>手机号码：</td>
            <td><input type="text" name="phone" th:value="${accountToUpdate.phone}"></td>
        </tr>
        <tr>
            <td>默认地址：</td>
            <td><input type="text" name="address1" th:value="${accountToUpdate.address1}"></td>
        </tr>
        <tr>
            <td>备选地址：</td>
            <td><input type="text" name="address2" th:value="${accountToUpdate.address2}"></td>
        </tr>
        <tr>
            <td>市：</td>
            <td><input type="text" name="city" th:value="${accountToUpdate.city}"></td>
        </tr>
        <tr>
            <td>省：</td>
            <td><input type="text" name="state" th:value="${accountToUpdate.state}"></td>
        </tr>
        <tr>
            <td>邮编：</td>
            <td><input type="text" name="zip" th:value="${accountToUpdate.zip}"></td>
        </tr>
        <tr>
            <td>国家：</td>
            <td><input type="text" name="country" th:value="${accountToUpdate.country}"></td>
        </tr>
    </table>
    <input type="submit" th:value="${buttonValue}" class="button">
</form></div>
    <!-- 模态框 -->
    <div id="myModal" class="modal" th:if="${msg != null}">
        <!-- 模态框内容 -->
        <div class="modal-content">
            <span class="close"></span>
            <div th:if="${msg != null}" th:text="${msg}"></div>
            <button id="confirmBtn">确定</button>
        </div>
    </div>
    <script src="js/account.js" type="text/javascript"></script>
</body>
</html>